home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19950329-19950528 / 000015_news@columbia.edu_Fri Mar 31 17:26:20 1995.msg < prev    next >
Internet Message Format  |  2020-01-01  |  2KB

  1. Received: from apakabar.cc.columbia.edu by watsun.cc.columbia.edu with SMTP id AA09789
  2.   (5.65c+CU/IDA-1.4.4/HLK for <kermit.misc@watsun.cc.columbia.edu>); Fri, 31 Mar 1995 12:26:31 -0500
  3. Received: by apakabar.cc.columbia.edu id AA05024
  4.   (5.65c+CU/IDA-1.4.4/HLK for kermit.misc@watsun); Fri, 31 Mar 1995 12:26:26 -0500
  5. Path: news.columbia.edu!watsun.cc.columbia.edu!fdc
  6. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  7. Newsgroups: comp.protocols.kermit.misc
  8. Subject: Re: Trivial login script fails -- help
  9. Date: 31 Mar 1995 17:26:20 GMT
  10. Organization: Columbia University
  11. Lines: 28
  12. Message-Id: <3lhdvs$4sh@apakabar.cc.columbia.edu>
  13. References: <3ld1rm$5qb@vatican.passport.ca>
  14. Nntp-Posting-Host: watsun.cc.columbia.edu
  15. Apparently-To: kermit.misc@watsun.cc.columbia.edu
  16.  
  17. In article <3ld1rm$5qb@vatican.passport.ca>,
  18. Peter Renzland <peter@passport.ca> wrote:
  19. >...
  20. >input 20 login:
  21. >output peter\13
  22. >input 10 sword
  23. >output xyzzy\13
  24. >...
  25. >
  26. >I see the login prompt, then the script says "peter",
  27. >then _nothing_ (the script swallows the Password: prompt)
  28. >
  29. Try doing it like this:
  30.  
  31. input 20 {login: }
  32. if fail stop 1 No login prompt
  33. output peter\13
  34. input 10 {Password: }
  35. if fail stop 1 No Password prompt
  36. pause 1
  37. output xyzzy\13
  38.  
  39. It's always good to have error handling.  The other change is to 
  40. INPUT the *entire* prompt.  UNIX login does not permit typeahead, and
  41. it is likely that your script started sending the password too soon.
  42. (The "pause 1" might not be necessary, but better safe than sorry.)
  43.  
  44. - Frank